import { Injectable } from '@angular/core'
import { ACLService } from '@delon/acl'
import { ECustomAcl } from '@shared/enums'

@Injectable({
  providedIn: 'root'
})
export class CustomACLService {
  constructor(
    private aclService: ACLService,
  ) {}

  addACLAbility(role: ECustomAcl): void {
    this.aclService.add({
      role: [role],
      ability: [role],
    })
  }

  removeACLAbility(role: ECustomAcl): void {
    this.aclService.removeAbility([role])
  }
}
